import { createRouter,createWebHashHistory } from "vue-router";
import Home from '/src/views/Home.vue';
import Information from '/src/views/Information.vue';
import Fillin from '/src/views/Fillin.vue';
import Manager from '/src/views/Manager.vue';
import Administator from "../views/Administator.vue";
import QuestionnaireDesigner from '/src/components/QuestionnaireDesigner.vue';
import Inquiry from '/src/views/manager/Inquiry.vue';
import Management from "/src/views/manager/Management.vue";
import Statistics from "/src/views/manager/Statistics.vue";
import Login from '/src/views/login/Login.vue';
import Register from "/src/views/register/Register.vue";
import Main from "../components/Main.vue";
import Sidebar from "../components/Sidebar.vue";
import CreateSurvey from "../views/CreateSurvey.vue";
import CreateQuestion from "../views/Designer/CreateQuestion.vue";
import CreateOption from "../views/Designer/CreateOption.vue";
import Confirm from "../views/login/Confirm.vue";
import Reset from "../views/login/Reset.vue";
import Checkfilled from "../views/Checkfilled.vue";
import FilledSurveys from "../views/manager/FilledSurveys.vue";

const routes = [
  { path: '/', component: Login },
  { path: '/Register', component:Register},
  { path:'/reset', component:Reset},
  { path:'/confirm',component:Confirm},
  { path: '/Main', component: Main, children:[
  { path: '/Home', component: Home },
  { path: '/information', component: Information },
  { path: '/Fillin', component: Fillin },
  { path: '/Fillin/:id', name: 'Fillin' , component: Fillin },
  { path: '/Manager', component: Manager },
  { path: '/QuestionnaireDesigner',component: QuestionnaireDesigner},
  { path: '/Administator',component: Administator},
  { path: '/Inquiry',component: Inquiry},
  { path: '/Management',component: Management},
  { path: '/CreateSurvey',component: CreateSurvey},
  { path: '/CreateQuestion',component: CreateQuestion},
  { path: '/CreateOption',component: CreateOption},
  { path: '/Checkfilled',component: Checkfilled},
  { path: '/FilledSurveys',component:FilledSurveys},
  { path: '/Statistics',component: Statistics},]},


  ];

const router = createRouter({
    history:createWebHashHistory(),
    routes,
});

export default router;